28 July 2024
Files can be in one of four states:
Files can be in one of four states:
Files can be in one of four states:
Files can be in one of four states:
This is a once off action (per machine)
Or within R (via the usethis package)
OR via the gert package
Create a file (text, code etc)
Otherwise, create any kind of file (in the folder we just created)
Stage the changes (add)
For example:
Examples
.RData all files ending in .RData.pdf all files ending in .pdfdata/ the entire folder called data[main (root-commit) 1b2c303] Initial commit
1 file changed, 3 insertions(+)
create mode 100644 analysis.R
[main ee747c8] Added summary for x
1 file changed, 1 insertion(+)
analysis.R
summary.R
[main 29d3ff4] Added summaries for x and y
2 files changed, 5 insertions(+), 4 deletions(-)
create mode 100644 summary.R
* 29d3ff4 (HEAD -> main) Added summaries for x and y
* ee747c8 Added summary for x
* 1b2c303 Initial commit
commit author
1 29d3ff45df1b642c22c42996c9a6e522b7a78e42 pcinereus <i.obesulus@gmail.com>
2 ee747c8b73c9fd609b36a8ea07943270798cd733 pcinereus <i.obesulus@gmail.com>
3 1b2c30363df9df9d9f02a9b202dcb06a867f5cbc pcinereus <i.obesulus@gmail.com>
time files merge message
1 2024-07-28 10:51:43 2 FALSE Added summaries for x and y\n
2 2024-07-28 10:51:43 1 FALSE Added summary for x\n
3 2024-07-28 10:51:42 1 FALSE Initial commit\n
A listing (data.frame) of tracked files
For example:
checkout
reset
revert
# is a commit or tag name
Restore the HEAD to the tip of main
R/Rstudio
# is a commit or tag name
Restore HEAD to the tag V.1
[main 9e2d591] Revert "Added summaries for x and y"
Date: Sun Jul 28 10:51:50 2024 +0000
2 files changed, 4 insertions(+), 5 deletions(-)
delete mode 100644 summary.R
For example
We are on the new branch
Otherwise, create any kind of file (in the folder we just created)
For example:
We are on the main branch
Otherwise, create any kind of file
For example:
diff --git a/analysis.R b/analysis.R
index 2318425..668a9b6 100644
--- a/analysis.R
+++ b/analysis.R
@@ -2,3 +2,4 @@ x=seq(1, 10, len = 1)
y=40 * 2 + rnorm(10, 0, 5)
plot(x, y)
summary(x)
+mean(x)
diff --git a/test.R b/test.R
deleted file mode 100644
index 0242716..0000000
--- a/test.R
+++ /dev/null
@@ -1 +0,0 @@
-mean(c(1,2,3))
For example:
Merge made by the 'ort' strategy.
analysis.R | 1 +
1 file changed, 1 insertion(+)